libsodium: fix building with GCC 15.1
authorLovin Yarn <[email protected]>
Wed, 30 Jul 2025 11:56:13 +0000 (19:56 +0800)
committerJosef Schlehofer <[email protected]>
Wed, 30 Jul 2025 12:32:40 +0000 (14:32 +0200)
commit7814960a7d87b9b69728c1dae8db754314ceb8de
treea5d680085c8b41944bfe0edb1918d633e566475a
parent49eafacec356507ac5bbe6087fd849eede080804
libsodium: fix building with GCC 15.1

Force the default C version to -std=gnu17,

to fix the following build error:

<command-line>: error: unknown type name 'thread_local'; did you mean 'pthread_rwlock_t'?
randombytes/internal/randombytes_internal_random.c:132:8: note: in expansion of macro 'TLS'
  132 | static TLS InternalRandom stream = {
      |        ^~~
randombytes/internal/randombytes_internal_random.c:132:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'stream'
  132 | static TLS InternalRandom stream = {
      |                           ^~~~~~

[1] https://github.com/openwrt/openwrt/pull/16522#issuecomment-3134756935
[2] https://github.com/openwrt/packages/issues/27122

Tested-by: Georgi Valkov <[email protected]>
Signed-off-by: Lovin Yarn <[email protected]>
libs/libsodium/Makefile